@import url('./base.less'); // 用于覆盖上面定义的变量
@import url('./utils.less');

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
dl,
dt,
dd,
ul,
ol,
div,
li,
table,
thead,
tbody,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
select {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-width: 1220px;
}
@-ms-viewport {
  width: device-width;
}

/* 公用样式 */
.marl10 {
  margin-left: 10px;
}
.marr10 {
  margin-right: 10px;
}
.mart10 {
  margin-top: 10px;
}
.color-default {
  color: @text-color-secondary;
}

.overflowtext {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  .ant-btn-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: left;
    >span {
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
    }
  }
}

.submit-area {
  text-align: center;
  margin-top: 30px;
  .ant-btn {
    margin-left: 10px;
  }
}

.btn-area {
  display: flex;
  justify-content: center;
  .ant-btn {
    margin: 0 10px;
  }
}

.form-btn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 24px;
  button {
    margin: 0 5px;
  }
}
.ant-form-item-label > label {
  color: @text-color-2;
}

.table-action {
  display: flex;
  justify-content: flex-start;
  .ant-btn {
    font-size: 12px;
  }
}

/* 覆盖antd 样式 */
.tantuer {
  .ant-table-thead > tr > th.ant-table-selection-column,
  .ant-table-tbody > tr > td.ant-table-selection-column {
    text-align: left;
  }
  .search-clear {
    .ant-input:not(:last-child) {
      padding-right: 45px;
    }
  }
  .ant-alert-close-icon {
    line-height: 16px;
  }

  /* table */
  .ant-table-expand-icon-th,
  .ant-table-row-expand-icon-cell {
    width: 30px;
    min-width: 30px;
    text-align: left;
  }
  .ant-table-wrapper.fixed {
    .ant-table table {
      table-layout: fixed;
    }
    .ant-table-thead > tr > th {
      line-height: 48px;
      padding: 0 8px;
      &:first-child,
      &.ant-table-selection-column {
        padding-left: 0;
      }
    }
    .ant-table-tbody > tr > td {
      padding: 8px;
      &:first-child,
      &.ant-table-selection-column {
        padding-left: 0;
      }
    }
    .ant-table-tbody > tr > td {
      line-height: 20px;
    }
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td {
      border-bottom: 1px solid @border-color-base-2;
    }
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table-thead > tr > th > div {
      white-space: nowrap;
      overflow: hidden;
    }
    .ant-table-tbody > tr > td {
      text-overflow: ellipsis;
    }
  }

  /* tabs 覆盖*/
  .tantuer-tabs {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    .ant-tabs {
      height: 100%;
    }
    .ant-tabs-content {
      height: calc(100% - 40px);
      .ant-tabs-tabpane-active {
        height: 100%;
      }
    }
    .pane-iframe {
      width: 100%;
      height: 100%;
      border: none;
    }
    .ant-tabs-bar {
      margin-bottom: 0;
    }
    .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
      border: 1px solid @color-light-9;
      margin: 5px 5px 8px 5px;
      border-radius: 0;
      color: @defaultColor;
      line-height: 30px;
      height: 30px;
      padding: 0 5px;
      font-size: @smallFont;
      &.ant-tabs-tab-active {
        background: @color-primary-secend;
        border: 1px solid @color-primary-secend;
        color: @text-color-light;
      }
      .ant-tabs-close-x {
        margin-right: 0;
      }
    }
  }
  // table表头加溢出省略
  .ant-table-thead{
    th{
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      word-break: break-word;
      .ant-table-header-column{
        max-width: 100%;
        .ant-table-column-title{
          display: block;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }      
      }
    }
  }

  .ant-card {
    box-shadow: 0 1px 3px 0 @color-light-9;
    border-radius: 0px;
    &.ant-card-bordered {
      border: none;
    }
    .ant-card-body {
      padding: 20px;
    }
  }
  .box-shadow {
    box-shadow: 0 1px 3px 0 @color-light-9;
  }
  .ant-table-row-expand-icon {
    border-color: @border-color-base-2;
  }
  .p30p20{
    padding:30px 20px
  }
  .plr20{
    padding:20px
  }
}

/* form 样式覆盖*/

.ant-form-item-label {
  text-align: left;
  max-width: 140px;
}
.disabled-override {
  .ant-form-item-label {
    max-width: none;
  }
}
.even-label {
  .ant-form-item-label {
    text-align: right;
    padding-right: 12px;
    max-width: 120px;
  }
}
.h3-title {
  color: @color-light-5;
  font-weight: 500;
  line-height: 1.5;
  margin: 16px 0;
  font-size: 14px;
}
.tantuer-form {
  .ant-row {
    display: flex;
  }

  .tantuer-field-area {
    padding: 10px 20px;
    background: @component-background;
    .form-title {
      color: @color-light-5;
      font-weight: 500;
      line-height: 1.5;
      margin-bottom: 16px;
    }
    .ant-select-selection--multiple .ant-select-selection__choice {
      background-color: @color-light-13;
      border-color: @color-light-10;
    }
    .ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice {
      color: @primary-color-6;
    }
    .compare-blue .ant-select-selection__choice{
      color: @primary-color!important;
    }
    .compare-red .ant-select-selection__choice{
      color: @error-color!important;
    }
    .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {
      color: @text-color-light-2;
      background-color: @color-light-14;
      border-color: @color-light-15;
    }
  }

  .tantuer-form-item {
    .ant-form-item-label {
      width: 120px;
      text-align: left;
    }
    .large {
      width: 420px;
      .ant-input {
        min-width: 150px;
      }
    }
    .default {
      width: 200px;
    }
    .small {
      width: 150px;
    }
    .num {
      width: 50px;
    }
    input {
      outline: none;
    }
  }
  .tantuer-form-item2 {
    .ant-form-item-label {
      width: 80px;
    }
  }
  .tantuer-form-item3 {
    .ant-form-item-label {
      width: 100px;
    }
  }
  .tantuer-form-item4 {
    .ant-form-item-label {
      width: 60px;
    }
  }

  .ant-form-item-control-wrapper,
  .flex-1 {
    padding-right: 16px;
    flex: 1;
  }
  .tantuer-form-item-nowrap {
    .ant-form-item-control-wrapper,
    .flex-1 {
      flex: 1;
      padding-right: 0;
    }
  }
  .tantuer-form-item-200{
    .mar-l-10{
      width: 200px;
    }
  }

  .ant-input,
  .ant-select-selection {
    border-color: @border-color-base;
    box-shadow: none;
    &:active {
      box-shadow: none;
    }
  }
}
.ant-btn-link {
  padding: 0 10px 0 0;
  &:hover,
  &:focus {
    color: @link-color-2;
  }
}
.ant-form-item {
  label {
    padding-left: 7px;
  }
  .ant-form-item-required {
    &:before {
      position: absolute;
      left: -1px;
      top: 3px;
    }
  }
}

// decription
.tk-decription {
  .ant-descriptions-row > th,
  .ant-descriptions-row > td {
    padding: 0;
  }
}
.ant-descriptions-bordered {
  .ant-descriptions-item-content,
  .ant-descriptions-item-label {
    &.active {
      background: @color-light-3;
    }
  }
}
.ant-checkbox-wrapper .ant-checkbox-disabled .ant-checkbox-inner {
  border: 1px solid @border-color-base !important;
}

.flex {
  display: flex;
  align-items: center;
  &.flex-start {
    justify-content: flex-start;
  }
  .flex-right-wp {
    width: 100%;
    margin-left: 10px;
  }
  &.flex-space-between {
    justify-content: space-between;
  }
}

.filter-menu {
  .ant-menu-item {
    font-size: 12px;
    &:not(:last-child) {
      margin-bottom: 5px;
    }
  }
}

/* 对比时，特殊的表单元素的样式展示 */
/* 多选select */
.ant-select-disabled {
  &.compare-blue {
    .ant-select-selection--multiple .ant-select-selection__choice {
      color: @primary-color;
    }
  }
  &.compare-red {
    .ant-select-selection--multiple .ant-select-selection__choice {
      color: @error-color;
    }
  }
}
.compare-blue {
  .ant-input-disabled,
  .ant-radio-wrapper-checked .ant-radio-disabled + span,
  .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked,
  .ant-checkbox-wrapper-checked .ant-checkbox-disabled + span {
    color: @primary-color;
  }
}
.compare-red {
  .ant-input-disabled,
  .ant-radio-wrapper-checked .ant-radio-disabled + span,
  .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked,
  .ant-checkbox-wrapper-checked .ant-checkbox-disabled + span {
    color: @error-color;
  }
}
.ant-message-notice {
  max-width: 400px;
  margin: 0 auto;
}
.ant-message-notice-content {
  word-break: break-all;
}
.cursor {
  &:hover {
    cursor: pointer;
  }
}

/*兼容ie*/

&.tantuer-layout-main {
  position: relative;
  & > .ant-layout-sider {
    position: fixed;
    height: 100%;
    z-index: 100;
  }

  .ant-layout-header.header-fixed {
    position: fixed;
    top: 0;
    left: 200px;
    z-index: 100;
    width: calc(100% - 200px);
    min-width: 1020px;
  }
  .collapsed {
    .ant-layout-header.header-fixed {
      width: calc(100% - 60px);
      left: 60px;
      min-width: 1160px;
    }
  }
  .layout-content {
    padding-top: 100px;
    margin-left: 200px;
    &.collapsed {
      margin-left: 60px;
    }
  }
}
.ant-time-picker-panel-select li.ant-time-picker-panel-select-option-selected,
.ant-time-picker-panel-select li.ant-time-picker-panel-select-option-selected:hover {
  background: @color-light-17 !important;
}
.ant-time-picker-panel-input {
  background-color: transparent;
}
.bg-light {
  background: @component-background;
}
.color-light-6 {
  color: @color-light-6;
}

.breadcrumb {
  height: 50px;
  line-height: 30px;
  position: fixed;
  top: 50px;
  width: calc(100% - 200px);
  z-index: 100;
  border-bottom: 1px solid @color-light-10;
  min-width: 1020px;
}
.collapsed {
  .breadcrumb {
    width: calc(100% - 60px);
    left: 60px;
    min-width: 1160px;
  }
}
.ant-calendar-disabled-cell .ant-calendar-date {
  color: @disabled-color-2!important;
  background-color: @btn-disable-bg!important;
}
.error-length3 {
  .ant-form-explain {
    width: 300%;
  }
}

.skin-loading {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1000;
  animation: fade 0.2s forwards;
  opacity: 0;
  .ant-spin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}
.ant-btn-link-dark {
  color: @color-light-5;
  &:hover{ color:@color-light-5}
}

.waring-txt{
  color: @error-color;
}

.operate-edit{
  font-size:16px;
  color:@text-color;
  margin-left: 10px;
}

/* 统一 风控 样式 新增 */
.ant-table-thead > tr > th{
  padding: 10px 16px;
  font-size: 14px;
  background:rgba(0,0,0,.04);
}
.ant-table-tbody > tr > td {
  padding: 14px 16px;
}
.ant-btn{
  font-size: 14px;
}
